﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FAQFrameworks;
using FooFun.DataElements.Dtos;
using DTOFrameworks;

namespace FooFun.Web.Controls
{
    public class TopicAction : DataElementControl
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            //UserManager userManager = new UserManager();
            //IDataElement user = userManager.GetElement(
            //    FAQContext.Current.User.AccountId);

            //if (user["Account"]["AccountName"].Equals("张源"))
            //{
            //    this.ShowContent("Show");
            //}

            LoginUser user = FAQContext.Current.User;
            if (user.IsInRole("版主")
                || user.IsInRole("系统管理员"))
            {
                this.ShowContent("Show");
            }
        }
    }
}
